home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 7140 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: mail2news.demon.co.uk!metsys.demon.co.uk
  2. From: John Standen <John@metsys.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: What to do when feof() is NOT feof()
  5. Date: Sat, 17 Feb 96 11:00:14 GMT
  6. Organization: JHS Systems & Software
  7. Message-ID: <824554814snz@metsys.demon.co.uk>
  8. Reply-To: John@metsys.demon.co.uk
  9. X-NNTP-Posting-Host: metsys.demon.co.uk
  10. X-Newsreader: Demon Internet Simple News v1.30
  11. X-Mail2News-Path: metsys.demon.co.uk
  12.  
  13. I have a function in a program which is reading each character
  14. in a file of some 700k characters.
  15.  
  16. The do{ while !feof(in) sometimes causes the function to terminate
  17. very early in the file.
  18.  
  19. I wrote a utility to read the file and give the line number of
  20. feof(in)......it returns ffff sometimes as early as line 200 in
  21. a 30,000 line file.
  22.  
  23. Any have any suggestions on the best way of coding a
  24.  
  25. do{
  26.  
  27. }while not the real feof(in) ignore all other feof(in)'s
  28.  
  29.  
  30. These files get the data via radio, satellite, long distance telephone,
  31. etc, somewhere they get the feof as a corrupt character.
  32.  
  33. So there could be any number of EOF's in the file.
  34.  
  35. John
  36. -- 
  37. Douglas John Standen
  38.